/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 涛
 * Date: 2023-09-27
 * Time: 12:38
 */
public class Test {
    public static void main(String[] args) {
        MySingleList mySingleList = new MySingleList();
        //创建链表
        //mySingleList.createList();
        //测试长度
        //System.out.println(mySingleList.size());
        //测试是否包含
//        System.out.println(mySingleList.contains(12));
//        System.out.println(mySingleList.contains(45));
//        System.out.println(mySingleList.contains(124));
        //测试头插
//        mySingleList.addFirst(12);
//        mySingleList.addFirst(23);
//        mySingleList.addFirst(34);
        //mySingleList.display();
        mySingleList.addLast(12);
        mySingleList.addLast(23);
        mySingleList.addLast(34);
        mySingleList.addLast(45);
        mySingleList.display();
        mySingleList.addIndex(2,99);
        mySingleList.display();
    }
}
